home *** CD-ROM | disk | FTP | other *** search
/ AI Game Programming Wisdom / AIGameProgrammingWisdom.iso / SourceCode / 11 Learning / 04 Mommersteeg / Penny / PennyMatchingDlg.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-09-25  |  2.2 KB  |  81 lines

  1. // PennyMatchingDlg.h : header file
  2. //
  3.  
  4. #if !defined(AFX_PENNYMATCHINGDLG_H__16AEA787_A0B4_11D5_B5E8_0010A7018204__INCLUDED_)
  5. #define AFX_PENNYMATCHINGDLG_H__16AEA787_A0B4_11D5_B5E8_0010A7018204__INCLUDED_
  6.  
  7. #if _MSC_VER > 1000
  8. #pragma once
  9. #endif // _MSC_VER > 1000
  10.  
  11. /////////////////////////////////////////////////////////////////////////////
  12. // CPennyMatchingDlg dialog
  13.  
  14. #include "predictor.h"
  15.  
  16. class CPennyMatchingDlg : public CDialog
  17. {
  18. // Construction
  19. public:
  20.     CPennyMatchingDlg(CWnd* pParent = NULL);    // standard constructor
  21.  
  22. // Dialog Data
  23.     //{{AFX_DATA(CPennyMatchingDlg)
  24.     enum { IDD = IDD_PENNYMATCHING_DIALOG };
  25.     CButton    m_Tail;
  26.     CButton    m_Head;
  27.     CButton    m_ToggleStatistics;
  28.     CComboBox    m_Predictors;
  29.     CString    m_MachineScore;
  30.     CString    m_NumberOfPlays;
  31.     CString    m_SuccessRatio;
  32.     CString    m_YourScore;
  33.     CString    m_ThresholdRatio;
  34.     //}}AFX_DATA
  35.  
  36.     // ClassWizard generated virtual function overrides
  37.     //{{AFX_VIRTUAL(CPennyMatchingDlg)
  38.     protected:
  39.     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  40.     //}}AFX_VIRTUAL
  41.  
  42. // Implementation
  43. protected:
  44.     bool m_bExpanded;
  45.     int m_nSuccessfulPredictions;
  46.     int m_nTotalPredictions;
  47.     void ProcessSelection(int Selection);
  48.     void UpdateDisplay();
  49.     int m_nMachineWins;
  50.     int m_nPlayerWins;
  51.     int m_nRatio;
  52.     int m_nPlays;
  53.     HBITMAP m_hBitmapHead;
  54.     HBITMAP m_hBitmapTail;
  55.     void ResetGame();
  56.     CPredictor * m_pPredictor;
  57.     void RegisterPredictor(const CString & PredictorName, CPredictor * pPredictor);
  58.     HICON m_hIcon;
  59.  
  60.     // Generated message map functions
  61.     //{{AFX_MSG(CPennyMatchingDlg)
  62.     virtual BOOL OnInitDialog();
  63.     afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
  64.     afx_msg void OnPaint();
  65.     afx_msg HCURSOR OnQueryDragIcon();
  66.     afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  67.     afx_msg void OnSelChangePredictor();
  68.     afx_msg void OnDestroy();
  69.     afx_msg void OnHead();
  70.     afx_msg void OnTail();
  71.     afx_msg void OnToggleStats();
  72.     afx_msg void OnAbout();
  73.     //}}AFX_MSG
  74.     DECLARE_MESSAGE_MAP()
  75. };
  76.  
  77. //{{AFX_INSERT_LOCATION}}
  78. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  79.  
  80. #endif // !defined(AFX_PENNYMATCHINGDLG_H__16AEA787_A0B4_11D5_B5E8_0010A7018204__INCLUDED_)
  81.